<?php
/**
 * 
 * $Id: prepend.php 16 2010-04-25 16:23:22Z corlatti $
 * 
 */
//error_reporting(9999);
//inits session, must be first line before any output
session_start();

//constants definition
define('SITE', 'cccmi18n');
define('SITE_FOLDER', $_SERVER['DOCUMENT_ROOT'] . '/' . SITE . '/');
define('LIBRARY_FOLDER', SITE_FOLDER . 'library/');
define('MODEL_FOLDER', LIBRARY_FOLDER . 'dao/');
define('XAJAX_JS_LOCATION', '/' . SITE . '/library/thirdParty/xajax/');
define('DB_NAME','prueba');
define('CONNECTION_STRING', 'mysql://root:ade3saq1@localhost/' . DB_NAME);

//include helper to workaround nested includes problem
require_once 'IncludeHelper.class.php';

//generic exception include
IncludeHelper::inc('library/generic/SiteGenericException.exception.php');

//Doctrine DAO config and init
IncludeHelper::inc('library/thirdParty/Doctrine.php');
spl_autoload_register(array('Doctrine', 'autoload'));
$manager = Doctrine_Manager::getInstance();
$conn = Doctrine_Manager::connection(CONNECTION_STRING);
$manager->setAttribute(Doctrine::ATTR_MODEL_LOADING, Doctrine::MODEL_LOADING_CONSERVATIVE);
$manager->setAttribute(Doctrine::ATTR_QUOTE_IDENTIFIER, true); 
$manager->setAttribute(Doctrine::ATTR_AUTOLOAD_TABLE_CLASSES, true);
Doctrine::loadModels(MODEL_FOLDER);



?>